import 'package:enter_prise_web/common/constants.dart';
import 'package:flutter/material.dart';

class CustomTextField extends StatelessWidget {
  const CustomTextField({
    super.key,
    required TextEditingController controller, this.hintText,
  }) : _controller = controller;
  final String? hintText;

  final TextEditingController _controller;

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.only(top: 10),
      child: Container(
        alignment: Alignment.center,
        width: 200,
        height: 30,
        decoration: BoxDecoration(
          border: Border.all(color: Colors.black, width: 1),
          borderRadius: BorderRadius.circular(5),
        ),
        child: TextField(
          
          cursorColor: kTextColor,
          maxLines: 1,
          textAlign: TextAlign.center,
          decoration:  InputDecoration(
              
              hintText: hintText,
              isCollapsed: true,
              border: InputBorder.none),
          textInputAction: TextInputAction.done,
          controller: _controller,
          
        ),
      ),
    );
  }
}
